import { Navigate } from "react-router-dom"
import React from "react"
import About from '../views/about'
import Demo from '../views/demo'

// import Home from "../views/home"
const Home = React.lazy(() => import("../views/home"))
const User = React.lazy(() =>import("../views/user"))
const Favtor = React.lazy(() =>import("../views/favtor"))

const routes = [
  {
    path:'/',
    element:<Navigate to="/home" />
  },
  {
    path:'/home',
    element:<Home/>
  },
  {
    path:"/about",
    element:<About/>
  },
  {
    path:"/demo",
    element:<Demo/>
  },
  {
    path:"/user/:id",
    element:<User />
  },
  {
    path:'/favtor',
    element:<Favtor />
  }
]

export default routes